<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Hello World</title>
  <script src="https://cdn.bootcdn.net/ajax/libs/react/18.2.0/umd/react.development.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/react-dom/18.2.0/umd/react-dom.development.js"></script>
  <!-- 引入 babel -->
  <script src="https://cdn.bootcdn.net/ajax/libs/babel-standalone/7.19.2/babel.min.js"></script>
</head>
<body>
  <div id="root"></div>

  <!-- 设置js代码被babel处理 -->
  <script type="text/babel">
    const button = <button>我是按钮</button>;
    const root = ReactDOM.createRoot(document.getElementById('root'));
    root.render(button);
  </script>
</body>
</html>